import { createApp } from 'vue'
import Particles from '@tsparticles/vue3'
import { loadFull } from 'tsparticles' // if you are going to use `loadFull`, install the "tsparticles" package too.
import { loadSlim } from 'tsparticles-slim'
import App from './App.vue'
import router from './router'
import store from './stores'
import PostHeader from '@/components/post-header/index.vue'
import './mock'
import 'element-plus/es/components/message/style/css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import Vue3DraggableResizable from 'vue3-draggable-resizable'
//需引入默认样式
import 'vue3-draggable-resizable/dist/Vue3DraggableResizable.css'
import WujieVue from "wujie-vue3";
const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(WujieVue);
app.component('PostHeader', PostHeader)
app.use(store)
app.use(router)
app.use(Particles, {
  init: async (engine) => {
    await loadFull(engine) // you can load the full tsParticles library from "tsparticles" if you need it
    // await loadSlim(engine as any) // or you can load the slim version from "tsparticles-slim" if don't need Shapes or Animations
  }
})
app.use(Vue3DraggableResizable)

app.mount('#app')
